﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace Common
{
    [DataContract]
    public class Issue : HsePSObject
    {
        public Issue()
        {
            ID = Guid.NewGuid().ToString();
            CreationTime = DateTime.Now;
            ModificationTime = DateTime.Now;
            Sections = new List<Section>();
        }

        [DataMember]
        public string ID { get; private set; }
        [DataMember]
        public string Title { get; set; }
        [DataMember]
        public DateTime PublishDate { get; set; }
        [DataMember]
        public DateTime CreationTime { get; private set; }
        [DataMember]
        public DateTime ModificationTime { get; private set; }
        [DataMember]
        public List<Section> Sections { get; private set; }
        [DataMember]  
        public bool IsPublished { get; set; }
    }

    public class IssueSection
    {
        public IssueSection()
        {
            this.ID = Guid.NewGuid().ToString();
        }

        public string ID { get; set; }
        public string IssueID { get; set; }
        public string SectionID { get; set; }
    }
}